package com.hc.model.code04.test10.black_box;

/**
 * @version v1.0
 * @ClassName: GameRole
 * @Description: 游戏角色类
 * @Author: HC
 */
public class GameRole {
    private int vit;
    private int atk;
    private int def;

    public void initState() {
        this.vit = 100;
        this.atk = 100;
        this.def = 100;
    }

    public void fight() {
        this.vit = 0;
        this.atk = 0;
        this.def = 0;
    }

    public Memento saveState() {
        return new Memento(vit, atk, def);
    }

    public void recoverState(Memento memento) {

    }
}
